package cn.stylefeng.guns.sys.modular.system.db2.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory;
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.db2.entity.Student;
import cn.stylefeng.guns.sys.modular.system.db2.mapper.StudentMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 管理员表 服务实现类
 * </p>
 *
 * @author stylefeng
 * @since 2018-12-07
 */
@Service
public class StudentService extends ServiceImpl<StudentMapper, Student> {
    public List<Student> testMul(){
        List<Student> students = this.baseMapper.slectAll();
        return students;
    }


    public LayuiPageInfo findPageBySpec(Student param) {
        Page pageContext = getPageContext();
        IPage page = this.baseMapper.customPageList(pageContext, param);
        return LayuiPageFactory.createPageInfo(page);
    }

    private Page getPageContext() {
        return LayuiPageFactory.defaultPage();
    }



}
